home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / ENET.p < prev    next >
Encoding:
Text File  |  1991-04-03  |  2.4 KB  |  93 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {
  4. Created: Thursday, October 4, 1990 at 8:00 AM
  5.     ENET.p
  6.     Pascal Interface to the Macintosh Libraries
  7.  
  8.     Copyright Apple Computer, Inc. 1989-1990
  9.     All rights reserved
  10. }
  11.  
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes := 0}
  15. {$ENDC}
  16.  
  17.  
  18.     UNIT ENET;
  19.     INTERFACE USES    Types,OSUtils;
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. CONST
  37. ENetSetGeneral = 253;     {Set "general" mode}
  38. ENetGetInfo = 252;         {Get info}
  39. ENetRdCancel = 251;         {Cancel read}
  40. ENetRead = 250;             {Read}
  41. ENetWrite = 249;         {Write}
  42. ENetDetachPH = 248;         {Detach protocol handler}
  43. ENetAttachPH = 247;         {Attach protocol handler}
  44. ENetAddMulti = 246;         {Add a multicast address}
  45. ENetDelMulti = 245;         {Delete a multicast address}
  46.  
  47. eLenErr = -92;           {Length error ddpLenErr}
  48. eMultiErr = -91;         {Multicast address error ddpSktErr}
  49.  
  50. EAddrRType = 'eadr';     {Alternate address resource type}
  51.  
  52. TYPE
  53. EParamBlkPtr = ^EParamBlock;
  54. EParamBlock = PACKED RECORD
  55.     qLink: QElemPtr;                                    {next queue entry}
  56.     qType: INTEGER;                                     {queue type}
  57.     ioTrap: INTEGER;                                    {routine trap}
  58.     ioCmdAddr: Ptr;                                     {routine address}
  59.     ioCompletion: ProcPtr;                                {completion routine}
  60.     ioResult: OSErr;                                    {result code}
  61.     ioNamePtr: StringPtr;                                {->filename}
  62.     ioVRefNum: INTEGER;                                 {volume reference or drive number}
  63.     ioRefNum: INTEGER;                                    {driver reference number}
  64.     csCode: INTEGER;                                    {call command code AUTOMATICALLY set}
  65.     CASE INTEGER OF
  66.       ENetWrite,ENetAttachPH,ENetDetachPH,ENetRead,ENetRdCancel,ENetGetInfo,ENetSetGeneral:
  67.         (eProtType: INTEGER;                            {Ethernet protocol type}
  68.         ePointer: Ptr;
  69.         eBuffSize: INTEGER;                                {buffer size}
  70.         eDataSize: INTEGER);                             {number of bytes read}
  71.       ENetAddMulti,ENetDelMulti:
  72.         (eMultiAddr: ARRAY [0..5] of char);                {Multicast Address}
  73.     END;
  74.  
  75.  
  76. FUNCTION EWrite(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  77. FUNCTION EAttachPH(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  78. FUNCTION EDetachPH(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  79. FUNCTION ERead(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  80. FUNCTION ERdCancel(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  81. FUNCTION EGetInfo(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  82. FUNCTION ESetGeneral(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  83. FUNCTION EAddMulti(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  84. FUNCTION EDelMulti(thePBptr: EParamBlkPtr;async: Boolean): OSErr;
  85.  
  86.     { UsingENET }
  87.  
  88.  
  89.     IMPLEMENTATION
  90. END.
  91.  
  92.  
  93.